home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / cpcug.zip / DISK.DOC < prev    next >
Text File  |  1987-04-20  |  10KB  |  223 lines

  1. DISK                                             MJH Consulting
  2. Command
  3. Copyright (c) 1985, MJH Consulting
  4. _______________________________________________________________
  5.  
  6. Purpose:  List information on all specified files regardless of
  7.           where they reside on the disk.
  8.  
  9.           The display line for each file indicates the complete
  10.           complete path specification of all files located.
  11.           Based on command parameters, the information may
  12.           optionally include the file size in decimal bytes, the
  13.           disk space allocated to the file, its percent slack
  14.           space, the date and time the file was last written to,
  15.           and the file attributes.  The information may include
  16.           subtotals by directory and a grand total concerning the
  17.           files located, and the total amount of free space left
  18.           on the disk.  A command parameter is available to list
  19.           the total allocated space required by the requested
  20.           files if they were to be copied to a target disk.
  21.  
  22.           The output information may be formatted and redirected
  23.           to a file usable as a batch command file.  Although not
  24.           normally listed, files with the hidden or system
  25.           attribute may be included in the list.  Normally only
  26.           data file information is listed.  A command parameter
  27.           is available to list directory file linformation
  28.           instead.
  29.  
  30.               Note: This command requires DOS 2 or later and will produce an
  31.               error if used with DOS 1.
  32.  
  33. Format:   DISK[/P][/H][/D][/W][/B][/C][/F][/T][/Rd] [d:][filename[.ext]]
  34.  
  35.               Note:  The optional filename may not include a path
  36.               specification since the entire disk is searched by this command.
  37.  
  38. Type:     Internal    External
  39.                          ***
  40.  
  41. Remarks:  The /P parameter causes the display to Pause when the screen is
  42.           full.  When you are ready to continue listing the information, press
  43.           any key.  The Ctrl-Break key pair is active at this time and can
  44.           abort the command without further output.  This parameter may be
  45.           used with any other parameter.
  46.  
  47.           The /H parameter permits files with the Hidden and system attributes
  48.           to also be selected by the command.  This parameter may be used with
  49.           any other parameter.
  50.  
  51.           The /D parameter causes Directory files to be selected INSTEAD of
  52.           data files.  This parameter may not be used with either the /F or
  53.           the /R parameters since file size is not computed for the directory
  54.           files themselves.
  55.  
  56.           The /W parameter produces a Wide display of the data.  The directory
  57.           path is specified on a line by itself followed by lines of the
  58.           filenames located in that directory.  Each line displayed contains
  59.           five names.  (This parameter is only recommended for 80-column
  60.           displays.)  This parameter may not be used with the /B or /C
  61.           parameters.
  62.  
  63.           Both the /B and /C parameters produce a list, one file per line,
  64.           with the path name Concatenated to the front of each filename
  65.           located.  If redirection of output is done to a disk file, this list
  66.           is suitable for editing.  With the /B parameter, each complete name
  67.           is preceded by the characters "%1 " and followed by the characters
  68.           " %2".  If redirection of output is done to a disk file, this list
  69.           is suitable for subsequent use as a Batch command file.  These two
  70.           parameters are mutually exclusive.  They may not be used with the /W
  71.           or /F parameters.
  72.  
  73.           The /F parameter gives Full information for each file.  It will list
  74.           the file size and allocated space in decimal bytes, the percent
  75.           slack space, the date and time, and the file attributes for each
  76.           file listed.  (This parameter is only recommended for 80-column
  77.           displays.)  If used with the /W parameter, full information is only
  78.           included on whatever total lines are displayed.  This parameter may
  79.           be used with the /B and /C parameters only if also used with the /T
  80.           parameter.  This parameter may not be used with the /D parameter.
  81.  
  82.           The /T parameter will cause Totals to be calculated for each
  83.           directory in which a file is located.  If used with the /B or /C
  84.           parameters, this parameter will output only a grand total on the
  85.           standard error device.
  86.  
  87.           The /Rd parameter indicates the Results of copying the selected
  88.           files to another disk.  The proposed target disk drive letter is
  89.           entered immediately following the R.  A total line indicates the
  90.           allocated space required by the files on that disk, and the current
  91.           space available on that disk.  Less space than indicated may
  92.           actually be needed if some of these files would replace existing
  93.           ones on that disk.  This parameter may not be used with the /D
  94.           parameter.
  95.  
  96.           The /W, /F, /B, and /C parameters all define what information will
  97.           be listed concerning the located file.  If none are specified, the
  98.           command lists the standard file information.  The directory path is
  99.           specified on a line by itself followed by lines of the filenames
  100.           located in that directory.  The display line for each file indicates
  101.           the filename located, its size in decimal bytes and the date and
  102.           time the file was last written to.  If the /D parameter was
  103.           specified, the filenames are directory files and no filesize is
  104.           listed.
  105.  
  106.           The command writes all information to the standard output device
  107.           which may be redirected or piped.  Using either the /B or /C
  108.           parameters causes the heading and total lines to list on the
  109.           standard error device.  The command sets the ERRORLEVEL exit code
  110.           upon completion:
  111.  
  112.               0 = normal exit
  113.               1 = invalid input parameters
  114.               2 = no files located
  115.  
  116.           The DISK command has two format options (any of the parameters may
  117.           be used with either option):
  118.  
  119.           Option 1 - List All Files
  120.  
  121.           Use this option to list all the files on a disk.  If the /D
  122.           parameter is specified, this option will list the directory tree
  123.           structure of the disk.  For example:
  124.  
  125.               DISK
  126.  
  127.           or
  128.  
  129.               DISK d:
  130.  
  131.           Option 2 - Locate Selected Files
  132.  
  133.           Use this option to locate selected files on a disk.  If the /D
  134.           parameter is specified, this option will locate selected directory
  135.           files on a disk.  You can use the global characters ? and * in the
  136.           filename and extension parameters.  For example:
  137.  
  138.               DISK filename.ext
  139.  
  140.           or
  141.  
  142.               DISK d:filename.ext
  143.  
  144. Problem:  I just want a list of all my disk files.
  145.  
  146. Example:  To list on the printer the names of all the files on the entire disk
  147.           enter:
  148.  
  149.               DISK/W  >LPT1:
  150.  
  151.           To include in the list the hidden files:
  152.  
  153.               DISK/W/H  >LPT1:
  154.  
  155. Problem:  I can't remember what subdirectory I put the file in, or which ones
  156.           BACKUP archived.
  157.  
  158. Example:  To locate all files with a file extension of BAT, listing full file
  159.           information with attributes, subtotals and totals, as well as
  160.           automatic pause at a full screen, enter:
  161.  
  162.               DISK/F/T/P  *.BAT
  163.  
  164. Problem:  I have organized my disk into many subdirectories and can't remember
  165.           the structure or how much each contains.
  166.  
  167. Example:  To list the names of all directories, enter:
  168.  
  169.               DISK/D/W
  170.  
  171.           To see the actual structure, sort the complete directory names with
  172.           the command:
  173.  
  174.               DISK/D/C  |  SORT
  175.  
  176.           To list the space used by each directory:
  177.  
  178.               DISK/F/T/W  |  FIND "---"
  179.  
  180. Problem:  Will this gr